Skip to content

chore: merge next into main#7167

Merged
ematipico merged 32 commits intomainfrom
next
Aug 13, 2025
Merged

chore: merge next into main#7167
ematipico merged 32 commits intomainfrom
next

Conversation

@ematipico
Copy link
Copy Markdown
Member

Summary

Test Plan

Docs

ematipico and others added 19 commits July 9, 2025 06:53
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

Co-authored-by: siketyan <12772118+siketyan@users.noreply.github.com>
Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
Co-authored-by: Conaclos <2358560+Conaclos@users.noreply.github.com>
…utes (#6506)

Co-authored-by: Arend van Beelen jr. <arend@arendjr.nl>

Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Co-authored-by: arendjr <533294+arendjr@users.noreply.github.com>
Co-authored-by: Conaclos <2358560+Conaclos@users.noreply.github.com>
Co-authored-by: matthewkeil <18608739+matthewkeil@users.noreply.github.com>
Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
…ors (#6159)

Co-authored-by: bavalpey <bavalpey@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
Co-authored-by: PointSingularity <56246797+PointSingularity@users.noreply.github.com>
Co-authored-by: siketyan <12772118+siketyan@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
# Conflicts:
#	crates/biome_lsp/src/handlers/text_document.rs
#	packages/@biomejs/backend-jsonrpc/src/workspace.ts
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Naoki Ikeguchi <me@s6n.jp>
# Conflicts:
#	.changeset/shaky-experts-sit.md
#	crates/biome_module_graph/src/lib.rs
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 9, 2025

🦋 Changeset detected

Latest commit: a78e878

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/wasm-web Minor
@biomejs/js-api Major
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 9, 2025

Walkthrough

Adds HTML interpolation support and related parser/lexer/token-source changes driven by new HtmlParseOptions/HtmlParseOptions re-exports; expands HTML formatter to handle new text-expression variants and updates benchmarks/tests. Threads working-directory into reporters and reporter visitor APIs and refactors summary reporter to produce per-file counts and clickable file links. Introduces many lint promotions/renames and several new rules (including Qwik rule domains), adds sorting options for assist actions, adjusts CLI workspace APIs (watcher/scan_project/is_path_ignored params), exposes wasm module-graph utilities, and updates configuration schema/options and tests.

Possibly related PRs

Suggested reviewers

  • dyc3
  • siketyan
  • arendjr
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch next

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Project Area: project A-Linter Area: linter A-Parser Area: parser A-Formatter Area: formatter A-LSP Area: language server protocol L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages labels Aug 9, 2025
@ematipico
Copy link
Copy Markdown
Member Author

TIL that you can't use "Create merge commit" if you have merge commits from main.

I rebased next from main and the merge commits are now gone. Hopefully, that should solve the issue and allow us to use the merge commit.

@siketyan
Copy link
Copy Markdown
Member

TIL that you can't use "Create merge commit" if you have merge commits from main.

I don't think so 🤔 Can I reset to 7d00fdd and try merging?

@siketyan
Copy link
Copy Markdown
Member

siketyan commented Aug 12, 2025

I think that's coming from this restriction in the branch protection rule.
https://github.com/biomejs/biome/settings/branch_protection_rules/40666069

image

@ematipico
Copy link
Copy Markdown
Member Author

That's what you get when you choose Create merge commit

Screenshot 2025-08-12 at 14 59 09

@siketyan
Copy link
Copy Markdown
Member

As merging next into main is special, we could bypass the rule and merge forcely

@siketyan
Copy link
Copy Markdown
Member

siketyan commented Aug 12, 2025

With the restriction, we can't use merge commit anyway even if we removed merge commits from the next branch. The restriction doesn't allow us to use merge commit on the main branch. It will be great if we can git reset --hard 7d00fdd (before rebasing) before merging so we can preserve the original history with the verified badge ✅

@ematipico
Copy link
Copy Markdown
Member Author

Would you like to do that? I probably don't understand the solution, so it's best if you do the rebase since you understand what we need to remove

@siketyan
Copy link
Copy Markdown
Member

@ematipico I restored the original state before you rebased the branch. Feel free to merge (bypassing rules) whenever you like :)

@arendjr
Copy link
Copy Markdown
Contributor

arendjr commented Aug 13, 2025

With the previous release I also just ignored the restriction. Rebasing everything can be quite tedious, and there's really not much harm in having an occasional merge commit in the history.

@BenjaminBrienen

This comment has been minimized.

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
crates/biome_graphql_syntax/src/file_source.rs (1)

39-41: Clarify intent: we treat .graphql and .graphqls the same

You link to the difference, but the implementation maps both to the same variant. A short note avoids confusion for readers expecting different handling.

Apply this diff to add the note:

     /// See the difference between .graphql and .graphqls files here:
     /// https://www.apollographql.com/docs/kotlin/essentials/file-types#sdl-schemas-graphqls
-    /// https://graphql.com/learn/schema/#inspecting-the-schema
+    /// https://graphql.com/learn/schema/#inspecting-the-schema
+    /// Note: Biome currently treats .graphql and .graphqls equivalently; no schema/operation distinction is made.

Optional: consider swapping the second link to the official GraphQL docs (https://graphql.org/learn/schema/) for longevity.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9121690 and a78e878.

⛔ Files ignored due to path filters (1)
  • crates/biome_cli/tests/snapshots/main_commands_format/can_format_graphphs_files.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (3)
  • .changeset/legal-mugs-care.md (1 hunks)
  • crates/biome_cli/tests/commands/format.rs (3 hunks)
  • crates/biome_graphql_syntax/src/file_source.rs (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/legal-mugs-care.md
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{rs,toml}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Format code (Rust + TOML) using just format

Format Rust and TOML files before committing (use just f/just format).

Files:

  • crates/biome_graphql_syntax/src/file_source.rs
  • crates/biome_cli/tests/commands/format.rs
crates/biome_*/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Core crates must be located in /crates/biome_*/

Files:

  • crates/biome_graphql_syntax/src/file_source.rs
  • crates/biome_cli/tests/commands/format.rs
🧠 Learnings (6)
📚 Learning: 2025-08-11T11:48:27.756Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:27.756Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/language.rs : Create tests/language.rs defining HtmlTestFormatLanguage and implement TestFormatLanguage for it

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-08-11T11:48:27.756Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:27.756Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/spec_test.rs : Create tests/spec_test.rs implementing the run(spec_input_file, _expected_file, test_directory, _file_type) function as shown and include!("language.rs")

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-08-11T11:48:27.756Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:27.756Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/spec_tests.rs : Create tests/spec_tests.rs in the biome_html_formatter crate that generates tests via tests_macros::gen_tests! for all HTML files at tests/specs/html/**/*.html

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-08-11T11:48:51.994Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:51.994Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import the FormatNode trait and implement it for your Node

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-08-11T11:48:51.994Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:51.994Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use the generic Format trait and FormatNode for AST nodes when implementing the formatter

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-08-05T13:25:32.395Z
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.395Z
Learning: Applies to benches/html_formatter.rs : Benchmark for HTML formatter must be in `benches/html_formatter.rs`

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
🧬 Code Graph Analysis (1)
crates/biome_cli/tests/commands/format.rs (2)
crates/biome_cli/tests/main.rs (1)
  • run_cli (332-347)
crates/biome_cli/tests/snap_test.rs (2)
  • assert_cli_snapshot (407-409)
  • assert_file_contents (438-449)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_html_formatter)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_html_parser)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test Node.js API
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: autofix
  • GitHub Check: Build @biomejs/wasm-web
🔇 Additional comments (4)
crates/biome_graphql_syntax/src/file_source.rs (1)

45-45: LGTM: recognise .graphqls as an extension

Good call adding "graphqls" alongside "graphql" and "gql". Case-insensitivity is already handled upstream via to_ascii_lowercase_cow(), so this is consistent.

crates/biome_cli/tests/commands/format.rs (3)

160-161: Whitespace-only change — no action needed

Looks like a harmless newline tweak. Nothing to do here.


162-175: Good addition: schema fixture for .graphqls

The new SPACING_GRAPHQLS_SANITY_BEFORE fixture is clear and representative for a spacing sanity check.


3550-3575: Nice coverage for write-mode syntax errors

Good to assert that --write fails on invalid syntax and leaves the file untouched. Complements format_shows_parse_diagnostics nicely.

Comment on lines +3382 to +3406
#[test]
fn can_format_graphphs_files() {
let fs = MemoryFileSystem::default();
let mut console = BufferConsole::default();

let file_path = Utf8Path::new("file.graphqls");
fs.insert(file_path.into(), SPACING_GRAPHQLS_SANITY_BEFORE.as_bytes());

let (fs, result) = run_cli(
fs,
&mut console,
Args::from(["format", "--write", file_path.as_str()].as_slice()),
);

assert!(result.is_ok(), "run_cli returned {result:?}");

assert_cli_snapshot(SnapshotPayload::new(
module_path!(),
"can_format_graphphs_files",
fs,
console,
result,
));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Fix typo in test name and strengthen the assertion

Two tweaks:

  • Typo: graphphs → graphqls (both function name and snapshot key)
  • Optional: sanity-check that the file actually changed after formatting

Apply this diff within the shown range:

-#[test]
-fn can_format_graphphs_files() {
+#[test]
+fn can_format_graphqls_files() {
     let fs = MemoryFileSystem::default();
     let mut console = BufferConsole::default();

     let file_path = Utf8Path::new("file.graphqls");
     fs.insert(file_path.into(), SPACING_GRAPHQLS_SANITY_BEFORE.as_bytes());

     let (fs, result) = run_cli(
         fs,
         &mut console,
         Args::from(["format", "--write", file_path.as_str()].as_slice()),
     );

     assert!(result.is_ok(), "run_cli returned {result:?}");
+
+    // Sanity: ensure the formatter changed the file
+    let mut content = String::new();
+    fs.open(file_path).unwrap().read_to_string(&mut content).unwrap();
+    assert_ne!(
+        content,
+        SPACING_GRAPHQLS_SANITY_BEFORE,
+        "expected the GraphQL schema to be reformatted"
+    );

     assert_cli_snapshot(SnapshotPayload::new(
         module_path!(),
-        "can_format_graphphs_files",
+        "can_format_graphqls_files",
         fs,
         console,
         result,
     ));
 }

If there are any other lingering “graphphs” typos in the repo, a quick scan helps:


🏁 Script executed:

#!/bin/bash
# Find any misspellings of "graphphs" across the repo
rg -n --no-ignore-vcs --hidden 'graphphs'

Length of output: 205


Fix typo in test name and add sanity‐check in format test

In crates/biome_cli/tests/commands/format.rs (lines 3382–3406):

  • Rename occurrences of “graphphs” → “graphqls” (function name & snapshot key).
  • After run_cli, read back the file and assert its contents differ from the unformatted input.
 #[test]
-fn can_format_graphphs_files() {
+fn can_format_graphqls_files() {
     let fs = MemoryFileSystem::default();
     let mut console = BufferConsole::default();

     let file_path = Utf8Path::new("file.graphqls");
     fs.insert(file_path.into(), SPACING_GRAPHQLS_SANITY_BEFORE.as_bytes());

     let (fs, result) = run_cli(
         fs,
         &mut console,
         Args::from(["format", "--write", file_path.as_str()].as_slice()),
     );

     assert!(result.is_ok(), "run_cli returned {result:?}");

+    // Sanity check: ensure the formatter changed the file
+    let mut content = String::new();
+    fs.open(file_path).unwrap().read_to_string(&mut content).unwrap();
+    assert_ne!(
+        content,
+        SPACING_GRAPHQLS_SANITY_BEFORE,
+        "expected the GraphQL schema to be reformatted"
+    );

     assert_cli_snapshot(SnapshotPayload::new(
         module_path!(),
-        "can_format_graphphs_files",
+        "can_format_graphqls_files",
         fs,
         console,
         result,
     ));
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#[test]
fn can_format_graphphs_files() {
let fs = MemoryFileSystem::default();
let mut console = BufferConsole::default();
let file_path = Utf8Path::new("file.graphqls");
fs.insert(file_path.into(), SPACING_GRAPHQLS_SANITY_BEFORE.as_bytes());
let (fs, result) = run_cli(
fs,
&mut console,
Args::from(["format", "--write", file_path.as_str()].as_slice()),
);
assert!(result.is_ok(), "run_cli returned {result:?}");
assert_cli_snapshot(SnapshotPayload::new(
module_path!(),
"can_format_graphphs_files",
fs,
console,
result,
));
}
#[test]
fn can_format_graphqls_files() {
let fs = MemoryFileSystem::default();
let mut console = BufferConsole::default();
let file_path = Utf8Path::new("file.graphqls");
fs.insert(file_path.into(), SPACING_GRAPHQLS_SANITY_BEFORE.as_bytes());
let (fs, result) = run_cli(
fs,
&mut console,
Args::from(["format", "--write", file_path.as_str()].as_slice()),
);
assert!(result.is_ok(), "run_cli returned {result:?}");
// Sanity check: ensure the formatter changed the file
let mut content = String::new();
fs.open(file_path).unwrap().read_to_string(&mut content).unwrap();
assert_ne!(
content,
SPACING_GRAPHQLS_SANITY_BEFORE,
"expected the GraphQL schema to be reformatted"
);
assert_cli_snapshot(SnapshotPayload::new(
module_path!(),
"can_format_graphqls_files",
fs,
console,
result,
));
}

pub fn try_from_language_id(language_id: &str) -> Result<Self, FileSourceError> {
match language_id {
"graphql" | "gql" => Ok(Self::default()),
"graphqls" | "graphql" | "gql" => Ok(Self::default()),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Sanity-check: is "graphqls" a widely used languageId?

Many editors/tools only emit "graphql" as the languageId. Accepting "graphqls" is harmless, but let’s confirm it’s used in the wild and ensure tests cover it.

Run this script to check where "graphqls" is referenced in the repo (tests, config, docs):

And, to confirm whether VS Code or LSP conventions include "graphqls" as a languageId, please run this web query:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo 'Occurrences of "graphqls" across the repo:'
rg -n --pretty --hidden --glob '!.git' '"graphqls"'

echo
echo 'Callers/tests for try_from_language_id/try_from_extension:'
rg -n --pretty --hidden --glob '!.git' 'try_from_language_id|try_from_extension'

Length of output: 4527


🌐 Web query:

Does VS Code or common GraphQL extensions define "graphqls" as a language identifier (languageId), or is "graphql" the de-facto standard?

💡 Result:

The de-facto standard language identifier (languageId) for GraphQL in VS Code and its common extensions is "graphql". Neither VS Code core nor major GraphQL extensions define "graphqls" as a language identifier; "graphql" is used for both query documents and schema files.

Supporting details:

  • The official [VS Code language identifiers documentation][8] only mentions "graphql" as a recognized language mode; "graphqls" is not documented as a languageId.

  • The most popular and canonical GraphQL extensions—including GraphQL for VSCode[7], Apollo's editor extension[6], and vscode-graphql by GraphQL Foundation[2][5]—all use "graphql" as the languageId for syntax highlighting, autocompletion, and language server features.

  • File associations in the extensions typically map both .graphql and .gql files (and sometimes .graphqls) to the "graphql" languageId[2][4][5]. The naming "graphqls" as an extension for schema files (.graphqls) is a file extension convention in some codebases but does not imply a separate languageId.

  • For example, the [vscode-graphql extension documentation][2][5] only references "graphql" as the language identifier—and "graphql" is the value used internally for language features, regardless of whether the file is a schema or a query.

  • Some developers use .graphqls as a filename extension for GraphQL schema files, but this is a convention at the file system level and does not affect the languageId, which remains "graphql"[2][4].

Summary table:

File Extensions languageId used by VS Code/extensions
.graphql, .gql, .graphqls graphql

Conclusion:
Use "graphql" as the languageId for both GraphQL queries and schemas in VS Code and common extensions. The identifier "graphqls" is not registered as a languageId; it's only seen occasionally as a filename extension convention[2][5][8].

Citations:


Align GraphQL languageId with VS Code conventions

Our investigation shows that VS Code and major GraphQL extensions only emit “graphql” (not “graphqls”) as the languageId, while .graphqls remains a file-extension convention. To bring our code in line:

• In crates/biome_graphql_syntax/src/file_source.rstry_from_language_id (around line 58), remove “graphqls” from the match arm:

-   "graphqls" | "graphql" | "gql" => Ok(Self::default()),
+   "graphql"  | "gql"      => Ok(Self::default()),

• Leave the .graphqls mapping in try_from_extension (around line 45) so schema files still resolve correctly.
• Add a unit test in biome_graphql_syntax to verify try_from_extension("graphqls") returns the expected GraphqlFileSource.

This change trims a redundant languageId while preserving support for the .graphqls extension.

🤖 Prompt for AI Agents
In crates/biome_graphql_syntax/src/file_source.rs around line 58, the match arm
for try_from_language_id incorrectly includes "graphqls" as a languageId; remove
"graphqls" so only "graphql" | "gql" map to Ok(Self::default()). Keep the
existing ".graphqls" mapping in try_from_extension (around line 45) unchanged so
schema file extensions still resolve. Add a unit test in the
biome_graphql_syntax tests that calls try_from_extension("graphqls") and asserts
it returns the expected GraphqlFileSource variant to ensure .graphqls is still
supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Core Area: core A-Diagnostic Area: diagnostocis A-Formatter Area: formatter A-Linter Area: linter A-LSP Area: language server protocol A-Parser Area: parser A-Project Area: project A-Tooling Area: internal tools L-CSS Language: CSS and super languages L-HTML Language: HTML and super languages L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.